package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 插入套餐与菜品的关系表
     * @param setmealDishes
     */
    void insertBatch(List<SetmealDish> setmealDishes);

    /**
     *
     * @param ids
     * @return
     */
    List<Long> getSetMealIdsByDishIds(List<Long> ids);

    /**
     * 删除套餐菜品关联数据
     * @param id
     */
    @Delete("delete from setmeal_dish where setmeal_id = id")
    void deleteBatch(Long id);
}
